/**
 * @file UpdateProfileHandler.cs
 * @author Zane Mayo
 * @date 21/5/2009
 */

using System;

namespace MxitAPI {
	
	
	public class UpdateProfileHandler : Handler {
		
		private string password;
		private string nickName;
		private bool loginNameHidden;
		private string dateOfBirth;
		private Gender gender;
		

		public UpdateProfileHandler() : base( typeof( UpdateProfileProtocolMessage ) ) {
		}
		
		public UpdateProfileHandler( string password, string nickName, bool loginNameHidden, string dateOfBirth, Gender gender ) : this() {
			this.password = password;
			this.nickName = nickName;
			this.loginNameHidden = loginNameHidden;
			this.dateOfBirth = dateOfBirth;
			this.gender = gender;
		}
		
		public override ProtocolMessage CreateRequestProtocolMessage ()
		{
			UpdateProfileProtocolMessage protocolMessage = new UpdateProfileProtocolMessage();
			protocolMessage.Password = Utilities.EncryptPassword( password );
			protocolMessage.NickName = nickName;
			protocolMessage.LoginNameHidden = loginNameHidden;
			protocolMessage.DateOfBirth = dateOfBirth;
			protocolMessage.Gender = gender;
			
			return protocolMessage;
		}

		
	}
}
